﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {

        private string[] operators = { "+", "-", "*", "/" };
        public Form1()
        {
            InitializeComponent();

            operatorComboBox.Items.AddRange(operators);
            //
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            int num1 = Convert.ToInt32(textBox1.Text);
            int num2 = Convert.ToInt32(textBox2.Text);

            switch (operatorComboBox.SelectedItem)
            {
                case "+":
                    textBox3.Text = (num1 + num2).ToString();
                    break;
                case "-":
                    textBox3.Text = (num1 - num2).ToString();
                    break;
                case "*":
                    textBox3.Text = (num1 * num2).ToString();
                    break;
                case "/":
                    textBox3.Text = (num1 / num2).ToString();
                    break;
                default:
                    break;
            }


        }
    }
}
